package collection;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class ArrayToList {
    public static void main(String[] args) {
        String[] a = {"one", "two", "three","four","five"};
        System.out.println(Arrays.toString(a));

        List<String> b = new ArrayList<>();
        b = Arrays.asList(a);
        System.out.println("b:"+b);

        a[1] = "six";
        System.out.println("a:"+Arrays.toString(a));
        System.out.println("b:"+b);
    }
}
